#ifndef POINT_ADD_DIALOG_H
#define POINT_ADD_DIALOG_H

#include <QDialog>
#include <QSpinBox>
#include <QLineEdit>
#include <QComboBox>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include "state_info.h"

class PointAddDialog : public QDialog
{
    Q_OBJECT

public:
    explicit PointAddDialog(PointInfo::Type type, int64_t station_id, QWidget *parent = nullptr);
    ~PointAddDialog();

    int getPointNumber() const;
    QString getPhysicalInfo() const;
    int getRelatedPoint() const;

private:
    void setupUI();
    void loadRelatedPoints();

    PointInfo::Type type_;
    int64_t station_id_;
    QSpinBox *point_number_spin_;
    QLineEdit *physical_info_edit_;
    QComboBox *related_point_combo_;
    QPushButton *ok_button_;
    QPushButton *cancel_button_;
};

#endif // POINT_ADD_DIALOG_H 